const fs = require("fs");
const path = require("path");
const fullPath = path.resolve(__dirname, "./data.txt");

function call(err) {
  if (err) {
    console.log("error -", err);
    return;
  }
  console.log("success");
}

// 追加写入
fs.appendFile(fullPath, "追加写入\r\n", call);
